package com.jzt.qf.task;

import com.jzt.qf.dao.JztTokenDao;
import lombok.extern.slf4j.Slf4j;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

@Component
@EnableScheduling
@EnableAsync
@Slf4j
public class Token {
    @Resource
    private JztTokenDao jztTokenDao;

    //TODO 300000秒执行一次（每5分钟执行一次。）
    @Scheduled(fixedRate = 300000)
    public void deleteToken() {
        jztTokenDao.delTokenByJztName("henan");
    }
}
